extends EqpLBtn



onready var anim = $anim


func rWearer():
	isDrag = true
	if item and item.wearer != null:
		$wearer.show()
		anim.show()
		anim.init(item.wearer)
		
#		var height = anim.frames.get_frame("idle",0).get_height()
		#anim.offset = item.wearer.animOffset
		#yield(sys.get_tree(),'idle_frame')
		#anim.rect_scale = item.wearer.animScale
#		#底部对齐
		#anim.rect_position.y = - anim.frames.get_frame("idle",0).get_height() * anim.rect_scale.y * 0.5  + 5 
	else:
		anim.hide()
		$wearer.hide()


func _on_wearer_pressed():
	if item and item.wearer != null:
		sys.newDlg("res://tscn/charaDlg/charaDlg.tscn").init(item.wearer)
